package com.example.customviewtest.my_recyclerview

import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.ViewGroup

/**
 * @auther XuDan on 2020/8/3.
 */
class MyRecycleView @JvmOverloads constructor(
        context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : ViewGroup(context, attrs, defStyleAttr) {
    init {
        Log.i("xd---", "init")

    }

    /**
     * 布局子View位置
     */
    override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
        Log.i("xd---", "onLayout")
    }

    /**
     * 测量大小
     */
    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec)
        Log.i("xd---", "onMeasure")

    }


}